<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="/layout/templateInternet.xhtml">

<ui:define name="body">

<a:loadScript src="js/sw-util.js" />

    <h:form id="AcompanhamentoInscricaoForm">

        <rich:panel>
            <f:facet name="header">#{messages.acompanhamentoInscricao}</f:facet>

            <s:decorate id="dataNascimentoField" template="/layout/edit.xhtml">
                <ui:define name="label">Data Nascimento</ui:define>
                <h:inputText id="dataNascimentoFieldId" required="true" value="#{AcompanhamentoInscricao.dataNascimento}" size="12" maxlength="10" onkeypress="return SomenteNumero(event,this,'##/##/####')" >
                	<s:validate />
                	<s:convertDateTime pattern="dd/MM/yyyy" />
                </h:inputText> <h:outputText value="   DD/MM/AAAA" />
            </s:decorate>

            <s:decorate id="cpfField" template="/layout/edit.xhtml">
                <ui:define name="label">CPF</ui:define>
                <h:inputText id="cpfFieldId" required="true" value="#{AcompanhamentoInscricao.cpf}" size="18" maxlength="14" validator="validaCPF" onkeypress="return SomenteNumero(event,this,'###.###.###-##')" >
                	<s:validate />
                </h:inputText> <h:outputText value="   XXX.XXX.XXX-XX" />
            </s:decorate>
            


            <div style="clear:both"/>

	        <div class="actionButtons">
	            <h:commandButton id="acompanhamentoInscricao" value="Consultar"
	                    action="#{AcompanhamentoInscricao.acompanhamentoInscricao}"/>
	        </div>

        </rich:panel>
        
        
    <rich:panel id="painelResultado">
        <f:facet name="header">Listagem de Candidatos</f:facet>

        <div class="results">

            <h:outputText value="Nenhum Candidato listado"
                       rendered="#{empty AcompanhamentoInscricao.candidatos}"/>

            <rich:dataTable id="candidatoList" var="_candidato1"
                      value="#{AcompanhamentoInscricao.candidatos}"
                   rendered="#{not empty AcompanhamentoInscricao.candidatos}">
                <h:column>
                    <f:facet name="header">CPF</f:facet>
                    #{_candidato1.cpf}
                </h:column>
                <h:column>
                    <f:facet name="header">Nome</f:facet>
                    #{_candidato1.nome}
                </h:column>
                <h:column>
                    <f:facet name="header">Cargo</f:facet>
                     #{_candidato1.cargo.codigo} - #{_candidato1.cargo.nome}
                </h:column>
                <h:column>
                    <f:facet name="header">Concurso</f:facet>
                    #{_candidato1.cargo.concurso.nome}
                </h:column>
                <h:column>
                    <f:facet name="header">#{messages.acoes}</f:facet>
                    
                    <s:link value="Ver Situacao" action="#{AcompanhamentoInscricao.select}" >
                    	<f:param name="idCandidato" value="#{_candidato1.id}" />
                    </s:link>
					<s:span >"      "</s:span>
                    <s:link value="2a via Boleto" view="/etCastSW?et=#{_candidato1.id}" propagation="end" />
                    
                </h:column>
            </rich:dataTable>

        </div>

    </rich:panel>
        
        

    </h:form>

</ui:define>

</ui:composition>
